package com.tingyuge.base.thread.concurrent2;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author xiaodao
 * @version 1.0
 * @date 2021/3/14
 */
public class Cas2 {

    public static void main(String[] args) {
        AtomicInteger atomicInteger = new AtomicInteger(5);
        System.out.println(atomicInteger.get());
        System.out.println(atomicInteger.getAndSet(8));

    }
}
